﻿using System.Collections.Generic;
using tour.szhome.map.DTO;
using TOUR.SZHOME.DAL;
using TOUR.SZHOME.Entity;
namespace TOUR.SZHOME.BLL
{
    /// <summary>
    /// 数据表Landscape_Image的业务逻辑类
    /// </summary>
    public class Landscape_ImageBLL
    {
        /// <summary>
        /// 查询项目相册
        /// </summary>
        /// <param name="JQID">项目ID</param>
        /// <returns></returns>
        public List<AlbumDTO> GetList(int JQID)
        {
            return Landscape_ImageDAL.GetAlbumList(JQID);
        }

        /// <summary>
        /// 获取景区下面的相册详情
        /// </summary>
        /// <param name="JQID"></param>
        /// <returns></returns>
        public List<Landscape_ImageEntity> GetListByJQID(int JQID)
        {
            return Landscape_ImageDAL.GetListByJQID(JQID);
        }

        /// <summary>
        /// 编辑、新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Edit(Landscape_ImageEntity model)
        {
            if (model.XCID > 0)
            {
                return Landscape_ImageDAL.Update(model);
            }
            else
            {
                return Landscape_ImageDAL.Insert(model);
            }
        }

        /// <summary>
        /// 根据ID删除对象
        /// </summary>
        /// <param name="jid"></param>
        /// <returns></returns>
        public bool DelByID(int jid)
        {
            return Landscape_ImageDAL.Delete(jid);
        }
    }
}
